﻿using IBatisNet.DataMapper;
using System;
using ${namespace}.Models

namespace ${namespace}.mapper
{
    class ${EntityClass}Mapper
    {
        private ISqlMapper mapper;

        public void insert(${EntityClass} entity)
        {
            mapper.Insert("insert", entity);
        }

        public void update(${EntityClass} entity)
        {
            mapper.Update("insert", entity);
        }

        public void delete(${KeyClass} id)
        {
            mapper.Delete("insert", id);
        }
        public ${EntityClass} selectByPrimaryKey(${KeyClass} id)
        {
            return mapper.QueryForObject<${EntityClass}>("selectByPrimaryKey", id);
        }

    }
}
